<!DOCTYPE html>
<html lang="en">
<head>
    <meta  http-equiv="content-type" content="text/html" charset="utf-8"/>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="UTF-8" src="test.js" ></script>
    <script type="text/javascript">
        /*
         var obj={};
         obj.name="somnue";
         obj.age = 10;
         obj['birthday'] = "1991/3/4";   //特别注意此种赋值方式
         obj.say = function(){
         console.log("hello world!");
         }
         for(var i in obj){
         alert(typeof i);
         alert(i +"--->"+ obj[i]);//只能写成obj[i],写成obj.i 都为undefined
         //因为此时i是一个字符串
         }
        */

        var obj = {};
        obj.name = "sss";
        /*Constructor:保存着对象的创建函数
        alert(obj.constructor);
        var arr = [];
        alert(arr.constructor);*/

        //hasOwnProperty
        var flag = obj.hasOwnProperty("age");

        //用于检查给定属性是否能够使用for-in语句来枚举；
        //什么情况不能枚举？？？
        var flag1 = obj.propertyIsEnumerable("name");
        alert(flag1);



    </script>
</head>
<body>

</body>
</html>